package smb.controller;

import lombok.AllArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import smb.domain.Teacher;
import smb.service.TeacherService;
import smb.vo.CourseSection;
import smb.vo.SectionVo;
import smb.vo.TeacherVo;

import java.util.List;

@RestController
@RequestMapping("/teacher")
@AllArgsConstructor
public class TeacherController {
    private TeacherService teacherService;

    @GetMapping("/{id}")
    public TeacherVo getTeacher(@PathVariable String id) {
        return teacherService.getTeacher(id);
    }

    @GetMapping("/{id}/section")
    public List<CourseSection> getSections(@PathVariable String id) {
        return teacherService.getSections(id);
    }

}
